package com.surfilter.gsxt.app.xyw;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.surfilter.gsxt.crawler.PhantomJSDriverPools;

import java.util.ResourceBundle;

public class Application {
    private static Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-main.xml");
        //开启固定大小的Phantomjs池
        int poolsNum = Integer.parseInt(ResourceBundle.getBundle("system-config").getString("phantomjs_pools_num"));
        PhantomJSDriverPools.initDriverPools(poolsNum);
        logger.info("程序启动完成");
    }
}